package com.im.domain;

import java.util.Date;

import com.im.domain.enumtype.UserStatus;

/**
 * Created by 岸芷汀翎 on 2017/1/26.
 * Description:用户信息
 */
public class User implements java.io.Serializable {
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
     * 用户id
     */
    private String id;

    /**
     * 用户名
     */
    private String name;
    /**
     * 用户设置
     */
    private String config;
    /**
     * 用户状态
     */
    private UserStatus status;
    
    private Date leaveTime;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getConfig() {
        return config;
    }

    public void setConfig(String config) {
        this.config = config;
    }

    public UserStatus getStatus() {
        return status;
    }

    public void setStatus(UserStatus status) {
        this.status = status;
        if(UserStatus.NotOnline.equals(status)){
        	this.leaveTime = new Date();
        }
    }

	public Date getLeaveTime() {
		return leaveTime;
	}
    
    
}
